from rest_framework import serializers
from .models import *


# 用户序列化器
class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fileds = ['id']


# 活动列表序列化器
class GatheringsSerializer(serializers.ModelSerializer):
    users = UserSerializer(many=True)

    class Meta:
        model = Gathering
        fields = '__all__'


class GatheringsJoinSerializer(serializers.ModelSerializer):
    class Meta:
        fields = ['message', 'success']


